<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png">
  </div>
  <div>{{user}}</div>
  <button class="btn" icon="el-icon-user" @click="updateUser">看看答案</button>
</template>

<script>
import { reactive, ref } from 'vue'

export default {
  name: 'App',
  setup() {
    const title = reactive({
      name: 'hello Vue3 -beta'
    })
    const user = ref('猜猜我是谁？')
    const updateUser = () => {
      user.value = '我是你自己呀'
    }
    return { title, user, updateUser }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
.btn {
  margin-top: 20px;
  background-color: #409eff;
  border-color: #409eff;
  color: #fff;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  border: none;
  padding: 10px 15px;
  border-radius: 5px;
}
</style>
